/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #4a4a4a);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* 游戏画布样式 */
#gameCanvas {
    width: 100% !important;
    height: auto !important;
    max-height: 70vh;
    object-fit: contain;
    border: 2px solid #666;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* 游戏信息面板样式 */
.game-info {
    width: 100%;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 200px;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.score-board {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.score-board p {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

/* 按钮样式 */
.controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* 操作说明样式 */
.instructions {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.instructions h3 {
    margin-bottom: 0.5rem;
    color: #4CAF50;
}

.instructions p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

/* 防止页面滚动 */
html, body {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* 添加触控按钮样式 */
.touch-controls {
    display: none;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.touch-btn {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: rgba(76, 175, 80, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    user-select: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .game-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .touch-controls {
        display: flex;
    }

    .instructions p {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    .score-board p {
        font-size: 1rem;
    }

    button {
        padding: 0.3rem;
        font-size: 0.9rem;
    }
} 